<template>
  <div class="allsinger">
     <Item :data="item" v-for="item of anchormore" :key="item.id" @click.native="handleDetail(item.id)"></Item>
  </div>
</template>

<script>
import Item from "./item/item.vue"
export default {
    components:{
        Item
    },
    data(){
        return{
            anchormore:[]
        }
    },
    mounted() {
        this.$http.get(`/artist/list?type=-1`).then(res=>{
           this.anchormore = res.data.artists
        })
    },
    methods:{
        handleDetail(val){
            console.log(val);
            this.$router.push(`/singerdetail?id=${val}`)
        }
    }
}
</script>

<style scoped>
.allsinger {
  padding: 20px 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
</style>